<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
    <th:block th:include="include :: header('修改缴费单')" />
    <th:block th:include="include :: datetimepicker-css" />
</head>
<body class="white-bg">
    <div class="wrapper wrapper-content animated fadeInRight ibox-content">
        <form class="form-horizontal m" id="form-bill-edit" th:object="${scPaymentBill}">
            <input name="id" th:field="*{id}" type="hidden">
            <div class="form-group">    
                <label class="col-sm-3 control-label">用户id：</label>
                <div class="col-sm-8">
                    <label class="control-label" th:text="*{userId}"></label>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">用户名称：</label>
                <div class="col-sm-8">
                    <label class="control-label" th:text="*{userName}"></label>
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">需支付金额：</label>
                <div class="col-sm-8">
                    <label class="control-label" th:text="*{amount}"></label> 元
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">缴费说明：</label>
                <div class="col-sm-8" th:with="type=${@dict.getType('sc_payment_category')}" >
                    <div th:each="dict : ${type}">
                        <div th:if="*{paymentCategory} eq ${dict.dictValue}">
                            <label class="control-label" th:text="*{#dates.format(createTime, 'yyyy')}+'年'"></label>
                            <label class="control-label" th:text="*{term != null ? '- 第'+term+'学期 -' : ' - ' }"></label>
                            <label class="control-label"  th:text="${dict.dictLabel}"></label>
                        </div>

                    </div>

                </div>
            </div>

            <div class="form-group">
                <label class="col-sm-3 control-label">扫码支付：</label>
                <div class="col-sm-9">
                    <img th:src="@{../getPayCode(id=*{id})}" class="imgcode small" />
                </div>
            </div>


        </form>
    </div>
    <th:block th:include="include :: footer" />
    <th:block th:include="include :: datetimepicker-js" />
    <script type="text/javascript">
        var prefix = ctx + "school/bill";
        $("#form-bill-edit").validate({
            focusCleanup: true
        });

        function submitHandler() {
            if ($.validate.form()) {
                $.operate.save(prefix + "/edit", $('#form-bill-edit').serialize());
            }
        }

        $("input[name='payDate']").datetimepicker({
            format: "yyyy-mm-dd",
            minView: "month",
            autoclose: true
        });

        $("input[name='paymentTime']").datetimepicker({
            format: "yyyy-mm-dd",
            minView: "month",
            autoclose: true
        });
    </script>
</body>
</html>